import BaseLayout from '../../layouts/BaseLayout.vue';
import Login from '../../views/Login/index.vue';
import home from '../../views/home/index.vue';


export default [
  {
    path: '/',
    redirect: '/workspace/workbench'
  },
  {
    path: '/home',
    // component: () => import('../../views/home/index.vue'),
    component: home,
    meta: { title: 'home' },
  },
  {
    path: '/login',
    component: Login,
    meta: { title: '登录页面' },
  },
  {
    path: '/workspace',
    // redirect: '/workspace/workbench',
    component: BaseLayout,
    meta: {
      title: '试验检测'
    },
    children: [
      {
        path: '/workspace/workbench',
        name: 'Workbench',
        component: () => import('../../views/workSpace/workbench/index.vue'),
        meta: { title: '试验检测', requireAuth: true, affix: true, closable: false },
      },
      {
        path: '/workspace/console',
        component: () => import('../../views/workSpace/console/index.vue'),
        meta: { title: '按人统计', requireAuth: true },
      },
      {
        path: '/workspace/analysis',
        component: () => import('../../views/workSpace/analysis/index.vue'),
        meta: { title: '按项目统计', requireAuth: true },
      },
      {
        path: '/workspace/zhcx',
        component: () => import('../../views/workSpace/zhcx/index.vue'),
        meta: { title: '综合查询', requireAuth: true },
      },
    ]
  },
  {
    path: '/system',
    component: BaseLayout,
    meta: { title: '系统管理' },
    children: [
      {
        path: '/system/user',
        component: () => import('../../views/System/user/index.vue'),
        meta: { title: '账号管理', requireAuth: true },
      },
      {
        path: '/system/role',
        component: () => import('../../views/System/role/index.vue'),
        meta: { title: '权限管理', requireAuth: true },
      },
      {
        path: '/system/equipment',
        component: () => import('../../views/System/equipment/index.vue'),
        meta: { title: '设备管理', requireAuth: true },
      },
      
       {
        path: '/system/cssx',
        component: () => import('../../views/System/cssx/index.vue'),
        meta: { title: '参数属性', requireAuth: true },
      }
    ]
  }, 
  {
    path: '/error',
    component: BaseLayout,
    meta: { title: '错误页面' },
    children: [
      {
        path: '/error/401',
        component: () => import('../../views/Error/401.vue'),
        meta: { title: '401' },
      },
      {
        path: '/error/403',
        component: () => import('../../views/Error/403.vue'),
        meta: { title: '403' },
      },
      {
        path: '/error/404',
        component: () => import('../../views/Error/404.vue'),
        meta: { title: '404' },
      },
      {
        path: '/error/500',
        component: () => import('../../views/Error/500.vue'),
        meta: { title: '500' },
      }
    ]
  },


  // {
  //   path: '/result',
  //   component: BaseLayout,
  //   meta: { title: '错误页面' },
  //   children: [
  //     {
  //       path: '/result/success',
  //       component: () => import('../../views/result/success.vue'),
  //       meta: { title: '成功页面', requireAuth: true },
  //     },
  //     {
  //       path: '/result/failure',
  //       component: () => import('../../views/result/failure.vue'),
  //       meta: { title: '失败页面', requireAuth: true },
  //     },
  //   ]
  // },
  // {
  //   path: '/list',
  //   component: BaseLayout,
  //   meta: { title: '列表页面' },
  //   children: [
  //     {
  //       path: '/table/base',
  //       component: () => import('../../views/table/base.vue'),
  //       meta: { title: '查询列表', requireAuth: true },
  //     },
  //     {
  //       path: '/table/card',
  //       component: () => import('../../views/table/card.vue'),
  //       meta: { title: '卡片列表', requireAuth: true },
  //     }
  //   ]
  // },{
  //   path: '/form',
  //   component: BaseLayout,
  //   meta: { title: '表单页面' },
  //   children: [
  //     {
  //       path: '/form/base',
  //       component: () => import('../../views/form/base.vue'),
  //       meta: { title: '基础表单', requireAuth: true },
  //     },
  //     {
  //       path: '/form/step',
  //       component: () => import('../../views/form/step.vue'),
  //       meta: { title: '分步表单', requireAuth: true },
  //     },
  //     {
  //       path: '/form/intricate',
  //       name: 'Intricate',
  //       component: () => import('../../views/form/intricate.vue'),
  //       meta: { title: '复杂表单', requireAuth: true },
  //     },
  //   ]
  // },{
  //   path: '/directive',
  //   component: BaseLayout,
  //   meta: { title: '内置指令' },
  //   children: [
  //     {
  //       path: '/directive/permission',
  //       component: () => import('../../views/directive/permission.vue'),
  //       meta: { title: '权限指令', requireAuth: true },
  //     },
  //   ]
  // },{
  //   path: '/component',
  //   component: BaseLayout,
  //   meta: { title: '常用组件' },
  //   children: [
  //     {
  //       path: '/component/qrcode',
  //       component: () => import('../../views/component/qrcode.vue'),
  //       meta: { title: '二维码', requireAuth: true },
  //     },
  //     {
  //       path: '/component/barcode',
  //       component: () => import('../../views/component/barcode.vue'),
  //       meta: { title: '条形码', requireAuth: true },
  //     },
  //     {
  //       path: '/component/treeSelect',
  //       component: () => import('../../views/component/treeSelect.vue'),
  //       meta: { title: '下拉树', requireAuth: true },
  //     },
  //   ]
  // }
]
